﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UC_NewsGroup.ascx.cs" Inherits="Stationery.UC.UC_NewsGroup" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
    
<table cellspacing="0" cellpadding="5" width="100%" border="0">    
    <tr>
        <td colspan="2">
            <dxwgv:ASPxGridView runat="server" KeyFieldName="Group_id" AutoGenerateColumns="False"
                ID="ASPxGridViewListNewsGroup" Width="100%" 
                oncelleditorinitialize="ASPxGridViewListNewsGroup_CellEditorInitialize" 
                onrowdeleting="ASPxGridViewListNewsGroup_RowDeleting" 
                onrowinserting="ASPxGridViewListNewsGroup_RowInserting" 
                onrowupdating="ASPxGridViewListNewsGroup_RowUpdating" >
                <SettingsBehavior ConfirmDelete="True" EnableRowHotTrack="True" />
                <Styles>
                    <AlternatingRow Enabled="True">
                    </AlternatingRow>
                </Styles>
                <SettingsPager PageSize="15">
                    <Summary AllPagesText="Trang: {0} - {1} ({2} bản ghi)" Text="Trang {0}/{1} ({2} bản ghi)" />
                </SettingsPager>
                <SettingsEditing Mode="PopupEditForm" PopupEditFormHeight="200px" 
                    PopupEditFormModal="True" PopupEditFormWidth="300px" 
                    PopupEditFormShowHeader="true" PopupEditFormHorizontalAlign="Center"/>
                <SettingsText EmptyDataRow="Không tồn tại dữ liệu" 
                    ConfirmDelete="Bạn có chắc chắn XÓA dữ liệu không?" 
                    PopupEditFormCaption="Thêm mới/Cập nhật nhóm tin tức" />
                <Columns>
                    <dxwgv:GridViewDataTextColumn Caption="Tên nhóm tin tức" FieldName="Group_name" 
                        VisibleIndex="0" Width="150px">
                        <PropertiesTextEdit Width="200px" >
                            <ValidationSettings CausesValidation="True" Display="Dynamic">
                                <RequiredField ErrorText="Tên nhóm không được để trống" IsRequired="True" />
                            </ValidationSettings>
                        </PropertiesTextEdit>
                        <EditFormSettings Visible="True" VisibleIndex="0" />
                    </dxwgv:GridViewDataTextColumn>                    
                    <dxwgv:GridViewDataTextColumn Caption="Số bài viết" FieldName="NNum" 
                        VisibleIndex="1" Width="100px">
                        <EditFormSettings Visible="False" VisibleIndex="1" />
                    </dxwgv:GridViewDataTextColumn>
                    <dxwgv:GridViewCommandColumn ButtonType="Image" Caption="Chức năng" 
                        VisibleIndex="2" Width="150px">
                        <EditButton Visible="True">
                            <Image AlternateText="Cập nhật" Url="~/Image/Icon/edit.gif" />
                        </EditButton>
                        <NewButton Visible="True">
                            <Image AlternateText="Thêm mới" Url="~/Image/Icon/add-icon.png" />
                        </NewButton>
                        <DeleteButton Visible="True">
                            <Image AlternateText="Xóa" Url="~/Image/Icon/delete.gif" />
                        </DeleteButton>
                        <CancelButton>
                            <Image AlternateText="Quay lại" Url="~/Image/Button/quaylai.png" />
                        </CancelButton>
                        <UpdateButton>
                            <Image AlternateText="Cập nhật" Url="~/Image/Button/capnhat.png" />
                        </UpdateButton>
                        <ClearFilterButton Visible="True">
                            <Image AlternateText="Xóa điều kiện tìm kiếm" 
                                Url="~/Image/Icon/icon_delete.gif" />
                        </ClearFilterButton>
                    </dxwgv:GridViewCommandColumn>
                </Columns>
                <Settings ShowFilterRow="True" />
            </dxwgv:ASPxGridView>
        </td>
    </tr>    	
</table>
